package org.jeecg.basic.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 产品BOM
 * @Author: LiCY
 * @Date: 2023-06-16
 * @Version: V1.0
 */
@Data
@TableName("mes_bom_item_setup")
@ApiModel(value = "产品BOM对象", description = "产品BOM")
@HeadFontStyle(fontHeightInPoints = 10)
public class MesBomItemSetup implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 产品
     */
    @ApiModelProperty(value = "产品")
    @MppMultiId
    @TableField(value = "partno")
    @ExcelProperty(value = "产品型号",order = 1)
    @ColumnWidth(15)
    private String partno;
    /**
     * 产品版本
     */
    @ExcelProperty(value = "产品版本",order = 2)
    @ColumnWidth(10)
    @ApiModelProperty(value = "产品版本")
    private String rev;
    /**
     * 物料
     */
    @ExcelProperty(value = "物料型号",order = 3)
    @ColumnWidth(15)
    @MppMultiId
    @TableField(value = "itempartno")
    private String itempartno;
    /**
     * 物料版本
     */
    @ExcelProperty(value = "物料版本",order = 4)
    @ColumnWidth(10)
    @ApiModelProperty(value = "物料版本")
    private String itemrev;
    /**
     * 英文描述
     */
    @ExcelProperty(value = "物料英文描述",order = 5)
    @ColumnWidth(15)
    @ApiModelProperty(value = "英文描述")
    private String descEn;

    /**
     * 本地描述
     */
    @ExcelProperty(value = "物料本地描述",order = 6)
    @ColumnWidth(15)
    @ApiModelProperty(value = "本地描述")
    private String descLocal;

    /**
     * 图号
     */
    @ExcelProperty(value = "图号",order = 7)
    @ColumnWidth(10)
    @ApiModelProperty(value = "图号")
    private String drawing;
    /**
     * 消耗数量
     */
    @ExcelProperty(value = "单站消耗数",order = 8)
    @ColumnWidth(10)
    @ApiModelProperty(value = "消耗数量")
    private BigDecimal qtyPer;

    /**
     * 单位
     */
    @ExcelProperty(value = "单位",order = 9)
    @ColumnWidth(5)
    @ApiModelProperty(value = "单位")
    private String unit;
    /**
     * 需要上料的工序
     */
    @ApiModelProperty(value = "上料工序")
    @MppMultiId
    @TableField(value = "op")
    @ExcelProperty(value = "上料工序",order = 10)
    @ColumnWidth(10)
    private String op;
    /**
     * 物料是否重用
     */
    @ApiModelProperty(value = "物料是否重用")
    @ExcelIgnore
    private String reuse;
    /**
     * 条码校验规则
     */
    @ApiModelProperty(value = "条码校验规则")
    @ExcelIgnore
    private String idpattern;
    /**
     * 条码名称
     */
    @ApiModelProperty(value = "条码名称")
    @ExcelIgnore
    private String idname;
    /**
     * 是否需要扣减物料批次
     */
    @ApiModelProperty(value = "是否需要扣减")
    @Dict(dicCode = "yn")
    @ExcelProperty(value = "是否扣减(0否1是)",order = 11)
    @ColumnWidth(10)
    private String lottrack;
    /**
     * 是否启用
     */
    @ApiModelProperty(value = "是否启用")
    @ExcelProperty(value = "是否启用(0否 1启用计算MRB 2仅启用)",order = 12)
    @ColumnWidth(25)
    private String enable;
    /**
     * 是否不分产品共享物料:1是共享其他都不共享
     */
    @ApiModelProperty(value = "是否共享物料")
    @Dict(dicCode = "yn")
    @ExcelIgnore
    private String shared;
    /**
     * 预警数量
     */
    @ApiModelProperty(value = "预警数量")
    @ExcelProperty(value = "预警数量",order = 13)
    @ColumnWidth(10)
    private BigDecimal warninglimit;
    /**
     * 拉动数量
     */
    @ApiModelProperty(value = "拉动数量")
    @ExcelIgnore
    private BigDecimal qtyPull;
    /**
     * 停机数量
     */
    @ApiModelProperty(value = "停机数量")
    @ExcelProperty(value = "停机数量",order = 14)
    @ColumnWidth(10)
    private BigDecimal blocklimit;
    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    @ExcelIgnore
    private Date ctime;
}
